function BattleSocket(name) {
    this.name = name;
    this.websocket = new WebSocket('ws://localhost:8181/BattleCity/websocket');
    
    var webSocket = this.websocket;
    
    
    webSocket.onmessage = log
};

BattleSocket.prototype.serverNotFoundException = null;

BattleSocket.prototype.connect = function(serverName){
    if(!serverNmae){
        if(this.serverNotFoundException){
            this.serverNotFoundException();
        }
        return;
    }
    this.websocket.send(serverName);
};

BattleSocket.prototype.create = function(serverName){
    if(!serverNmae){
        if(this.serverNotFoundException){
            this.serverNotFoundException();
        }
        return;
    }
    this.websocket.send(serverName);
};

